package com.itheima.utils;

import java.util.Collection;

//集合工具类
public class CollectionUtil {
    private CollectionUtil(){}

    //定义静态方法,遍历Collection集合
    public static <T> void printCollection(Collection<T> collection) {
        if (collection != null && collection.size() > 0) {
            for (T t : collection) {
                System.out.println(t);
            }
        }
    }
}
